<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="kozan" tagdir="/WEB-INF/tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<style type="text/css">
<!--
th {
	background-color: #EEEEEE;
}

tr.imp {
	background-color: #DBFFDC;
}
-->
</style>
<script type="text/javascript">
window.onload = validateAll;

	function validateAll(){
		validateAddPiesa();
		validateAdd();
	}

	function validateAddPiesa() {
		document.getElementById("addPiesa").disabled = false;
		if (document.getElementById("numePiesa").value.length == 0
				|| document.getElementById("cantitatePiesa").value.length == 0
				|| document.getElementById("starePiesa").value.length < 3) {
			document.getElementById("addPiesa").disabled = true;
		}
	}

	function validateAdd() {
		document.getElementById("addManoperaBtn").disabled = false;
		if (document.getElementById("denumire").value.length == 0
				|| document.getElementById("valoare").value.length == 0
				|| document.getElementById("durata").value.length == 0) {
			document.getElementById("addManoperaBtn").disabled = true;
		}
	}
</script>
</head>
<script type="text/javascript" src="../js/fieldValidator.js"></script>
<body>

	<div>
		<div>
			<c:import url="../fragments/header.jsp" />
		</div>
		<div>
			<div style="float: left;">
				<c:import url="../fragments/right.jsp" />
			</div>
			<div style="float: left">
				<kozan:reqManopera pagesize="5"/>
				<kozan:reqPiese pagesize="5"/>
				<br/>
				<form action="<%=request.getContextPath()%>/jsp/manopera.jsp" style="text-align: right;" method="post">
					<input name="anulez" type="submit" value="Anuleaza" title="Anuleaza"	/>
					<input name="inainte" type="submit" value="Inainte &gt;" title="Adauga manopera si piese"	/>
				</form>	
			</div>
		</div>
	</div>
</body>
</html>